package com.droowa.domain;

public class BoardPartition {
	int partitionId;
	String partitionName;
	int boardId;
	
	public BoardPartition() {
		super();
	}

	public BoardPartition(int partitionId, String partitionName, int boardId) {
		super();
		this.partitionId = partitionId;
		this.partitionName = partitionName;
		this.boardId = boardId;
	}

	public int getPartitionId() {
		return partitionId;
	}

	public void setPartitionId(int partitionId) {
		this.partitionId = partitionId;
	}

	public String getPartitionName() {
		return partitionName;
	}

	public void setPartitionName(String partitionName) {
		this.partitionName = partitionName;
	}

	public int getBoardId() {
		return boardId;
	}

	public void setBoardId(int boardId) {
		this.boardId = boardId;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + boardId;
		result = prime * result + partitionId;
		result = prime * result
				+ ((partitionName == null) ? 0 : partitionName.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		BoardPartition other = (BoardPartition) obj;
		if (boardId != other.boardId)
			return false;
		if (partitionId != other.partitionId)
			return false;
		if (partitionName == null) {
			if (other.partitionName != null)
				return false;
		} else if (!partitionName.equals(other.partitionName))
			return false;
		return true;
	}

	@Override
	public String toString() {
		return "BoardPartition [partitionId=" + partitionId
				+ ", partitionName=" + partitionName + ", boardId=" + boardId
				+ "]";
	}
}
